package com.maila.xiaoaoschool.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ListView;

import com.maila.xiaoaoschool.R;
import com.maila.xiaoaoschool.adapter.AddressAdapter;
import com.maila.xiaoaoschool.util.StartActivityUtils;
import com.zhy.autolayout.AutoRelativeLayout;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * 我的收货地址
 * Created by Administrator on 2017/10/31.
 */

public class MyAddressActivity extends AppCompatActivity {
    @BindView(R.id.white_return_iv)
    AutoRelativeLayout whiteReturnIv;
    @BindView(R.id.rl_add_address)
    AutoRelativeLayout rlAddAddress;
    @BindView(R.id.lv_address)
    ListView lvAddress;
    AddressAdapter addressAdapter;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_address);
        ButterKnife.bind(this);
        addressAdapter=new AddressAdapter(this);
        lvAddress.setAdapter(addressAdapter);
    }

    @OnClick({R.id.white_return_iv, R.id.rl_add_address})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.white_return_iv:
                finish();
                break;
            case R.id.rl_add_address:
                StartActivityUtils.start(this, AddaddressActivity.class);
                break;
        }
    }
}
